﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wwtfly.LoggerUtility
{
    /// <summary>
    /// 日志 信息 model
    /// </summary>
    public class LogMessageParams
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 模块编号
        /// </summary>
        public string ModuleID { get; set; }
        /// <summary>
        /// 功能编号
        /// </summary>
        public string FuncCode { get; set; }
        /// <summary>
        /// 日志级别，3级（WARN，EROR，FATL）
        /// </summary>
        public AppErrorLevel Level { get; set; }
        /// <summary>
        /// 错误码 
        /// </summary>
        public string ErrCode { get; set; }
        /// <summary>
        /// 发生的异常
        /// </summary>
        public Exception Excep { get; set; }
        /// <summary>
        /// 自定义的调试、错误信息
        /// </summary>
        public string logMessage { get; set; }
        /// <summary>
        /// 错误上下文
        /// </summary>
        public string ContextInfo { get; set; }
        /// <summary>
        /// 项目 名称
        /// </summary>
        public string ProgramName { get; set; }

    }
    /// <summary>
    /// 错误级别 枚举
    /// </summary>
    public enum AppErrorLevel
    {
        WARN = 0,
        EROR = 1,
        FATL = 2
    }
}
